﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Notice.aspx.cs" Inherits="Jy123.Web.Manage.User.Letter.Notice" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="../../css/custom/jquery.ui.css" rel="stylesheet" type="text/css" />
    <link href="../../css/main.css" rel="stylesheet" type="text/css" />

    <script src="../../js/jquery.js" type="text/javascript"></script>

    <script src="../../js/jquery.ui.js" type="text/javascript"></script>

    <script src="../../js/main.js" type="text/javascript"></script>
    <title>通知管理</title>
</head>
<body>
<h4>
        <a href="#"><span>通知管理</span></a></h4>
    <form id="form1" runat="server">
    <div>
    
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
            AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="ID" 
            DataSourceID="SqlDataSource1" CssClass="tblist">
            <Columns>
                <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" 
                    ReadOnly="True" SortExpression="ID" Visible="False" />
                <asp:BoundField DataField="SenderName" HeaderText="发送者" 
                    SortExpression="SenderName" />
                <asp:BoundField DataField="ReceiverName" HeaderText="接收者" 
                    SortExpression="ReceiverName" />
                <asp:BoundField DataField="Title" HeaderText="标题" SortExpression="Title" />
                <asp:BoundField DataField="PostTime" HeaderText="发送时间" 
                    SortExpression="PostTime" />
                <asp:BoundField DataField="PostIP" HeaderText="发送者IP" SortExpression="PostIP" />
                <asp:BoundField DataField="LtType" HeaderText="类型" SortExpression="LtType" />
                <asp:BoundField DataField="IsRead" HeaderText="已读" SortExpression="IsRead" />
                <asp:CheckBoxField DataField="IsReply" HeaderText="回复" 
                    SortExpression="IsReply" />
                <asp:BoundField DataField="IsDel" HeaderText="IsDel" SortExpression="IsDel" 
                    Visible="False" />
                <asp:CommandField ShowDeleteButton="True" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            DeleteCommand="DELETE FROM [User_Letter] WHERE [ID] = @ID" 
            InsertCommand="INSERT INTO [User_Letter] ([SenderName], [ReceiverName], [Title], [PostTime], [PostIP], [LtType], [IsRead], [IsReply], [IsDel]) VALUES (@SenderName, @ReceiverName, @Title, @PostTime, @PostIP, @LtType, @IsRead, @IsReply, @IsDel)" 
            SelectCommand="SELECT [ID], [SenderName], [ReceiverName], [Title], [PostTime], [PostIP], [LtType], [IsRead], [IsReply], [IsDel] FROM [User_Letter]" 
            UpdateCommand="UPDATE [User_Letter] SET [SenderName] = @SenderName, [ReceiverName] = @ReceiverName, [Title] = @Title, [PostTime] = @PostTime, [PostIP] = @PostIP, [LtType] = @LtType, [IsRead] = @IsRead, [IsReply] = @IsReply, [IsDel] = @IsDel WHERE [ID] = @ID">
            <DeleteParameters>
                <asp:Parameter Name="ID" Type="Int32" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="SenderName" Type="String" />
                <asp:Parameter Name="ReceiverName" Type="String" />
                <asp:Parameter Name="Title" Type="String" />
                <asp:Parameter DbType="Date" Name="PostTime" />
                <asp:Parameter Name="PostIP" Type="String" />
                <asp:Parameter Name="LtType" Type="Int32" />
                <asp:Parameter Name="IsRead" Type="Int32" />
                <asp:Parameter Name="IsReply" Type="Boolean" />
                <asp:Parameter Name="IsDel" Type="Int32" />
                <asp:Parameter Name="ID" Type="Int32" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="SenderName" Type="String" />
                <asp:Parameter Name="ReceiverName" Type="String" />
                <asp:Parameter Name="Title" Type="String" />
                <asp:Parameter DbType="Date" Name="PostTime" />
                <asp:Parameter Name="PostIP" Type="String" />
                <asp:Parameter Name="LtType" Type="Int32" />
                <asp:Parameter Name="IsRead" Type="Int32" />
                <asp:Parameter Name="IsReply" Type="Boolean" />
                <asp:Parameter Name="IsDel" Type="Int32" />
            </InsertParameters>
        </asp:SqlDataSource>
    <div class="allform">
        <h5>
        </h5>
        <ul>
            <li class="b">增加系统通知：</li>
            <li>
                通知标题：<asp:TextBox ID="txtTitle" runat="server" ValidationGroup="input" 
                    CssClass="text"></asp:TextBox>
                通知内容：<asp:TextBox ID="txtContent" runat="server" ></asp:TextBox>
            </li>
            
                    
            <li>
                <asp:Button ID="btnAddNotice" runat="server" Text="确定"
                    CssClass="button" ValidationGroup="input" onclick="btnAddNotice_Click" />
            </li>
        </ul>
    </div>
    </div>
    </form>
</body>
</html>
